import Vue from 'vue'

Vue.filter('date-format',(value,formatStr)=>{
    var date=new Date(value);
    var Y=date.getFullYear();
    var M=date.getMonth()+1<10 ? "0"+(date.getMonth()+1) :date.getMonth()+1 ;
    var D=date.getDate()<10 ? "0"+date.getDate():date.getDate();//获取日期
    var H=date.getHours()<10 ? "0"+date.getHours():date.getHours();
    var MIN=date.getMinutes()<10 ? "0"+date.getMinutes():date.getMinutes();
    var S=date.getSeconds()<10 ? "0"+date.getSeconds():date.getSeconds();

    var WenkDay=['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
    var Wenk=WenkDay[date.getDay()]  ;

    return Y+"-"+M+"-"+D+"\xa0\xa0"+H+":"+MIN+":"+S+"  "+Wenk

});
